<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/5/30
  Time: 12:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>销售报表</title>
    <style>
        .btn { margin: 5px; padding: 10px; }
        .btn-primary { background-color: green; color: white; }
        table { width: 100%; border-collapse: collapse; }
        th, td { padding: 10px; border: 1px solid #ddd; text-align: center; }
    </style>
</head>
<body>
<h1>销售报表</h1>
<form action="querySales" method="post">
    <input type="text" name="searchName" placeholder="请输入需要查找的销售名称！">
    <button type="submit" class="btn btn-primary">查询</button>
</form>
<table>
    <thead>
    <tr>
        <th>选择</th>
        <c:forEach var="columnName" items="${columnNames}">
            <th>${columnName}</th>
        </c:forEach>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="row" items="${salesData}">
        <tr>
            <td><input type="checkbox"></td>
            <c:forEach var="columnName" items="${columnNames}">
                <td><c:out value="${row[columnName]}" /></td>
            </c:forEach>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>